#include <iostream>
#include <fstream>
#include <vector>
#include <iterator>
#include <algorithm>
#include <utility>
using namespace std;

#define STDIN
#define STR(s) #s
//#define DEBUG

#define SIZE	101

vector<pair<int, int> > vec;
vector<int> result;
int t, n;
bool HasResult;

void SaveVal(int val, int cnt) {
    for (int i = 0; i < cnt; ++i)
        result.push_back(val);
}

void UnSaveVal(int cnt) {
    for (int i = 0; i < cnt; ++i)
        result.pop_back();
}

void PrintResult() {
    HasResult = true;
    vector<int>::iterator it = result.begin();
    for ( ; it != result.end(); it++) {
        if (it != result.begin())
            cout << "+"; 
        cout << *it;
    }
    cout << endl;
}


void SumItUp(unsigned int pos, int left) {
#if defined(DEBUG)
    cout << STR(pos) << pos <<"|"<< STR(left) << left << endl;
    vector<pair<int, int> >::iterator it = vec.begin();
    for (; it != vec.end(); ++it) {
        cout << (*it).first << " : " << (*it).second << "\t";
    }
    cout << endl;
    vector<int>::iterator it2 = result.begin();
    for (; it2 != result.end(); ++it2) {
        cout << *it2 << "\t";
    }
    cout << endl;
#endif
    if (pos > vec.size() || (pos == vec.size() && left != 0))
        return;
    if ((pos == vec.size() && left == 0) || (left == 0)) {
        PrintResult();
        return;
    }

    int val = vec[pos].first;
    int cnt = vec[pos].second;
    for (int i = cnt; i >= 0; i--) {
        SaveVal(val, i);
        SumItUp(pos+1, left-val*i);
        UnSaveVal(i);;
    }
}


template<typename T>
class match_first {
    public:
        T first;
        match_first(const T& t) : first(t) {};

        bool operator()(const pair<T, T>& p) {
            if (p.first == first) {
                return true;
            }
            return false;
        }
};

struct sort_desc {
    bool operator()(const std::pair<int,int> &left, const std::pair<int,int> &right) {
        return left.first > right.first;
    }
};



typedef vector< pair<int, int> >::iterator Iterator;

int main() {
#ifdef STDIN
    fstream cin("bin/1564.in");
#endif

    int k;
    while(cin >> t >> n && t != 0) {
        vec.clear();
        result.clear();
        HasResult = false;
        for (int i = 0; i < n; ++i) {
            cin  >> k;
            Iterator it = std::find_if(vec.begin(), vec.end(), match_first<int>(k));
            if (it == vec.end()){
                vec.push_back(make_pair<int, int>(k, 1));
            }else {
                (*it).second++;
            }
        }
        sort(vec.begin(), vec.end(), sort_desc());
        cout << "Sums of " << t << ":" << endl;
#if defined(DEBUG)
        vector<pair<int, int> >::iterator it = vec.begin();
        for (; it != vec.end(); ++it) {
            cout << (*it).first << " : " << (*it).second << " ";
        }
        cout << endl;
#endif
        SumItUp(0, t);

        if (!HasResult) {
            cout << "NONE" << endl;
        }
    }	
    return 0;
}
